package net.ib.mtalk.ui.buddy.item;

import android.os.Parcel;
import android.os.Parcelable;

public class BuddyUUIDItem implements Parcelable{
	public long msb;
	public long lsb;
	public String name;
	
	public BuddyUUIDItem(){
	}
	public BuddyUUIDItem(long msb, long lsb, String name){
		this.msb = msb;
		this.lsb = lsb;
		this.name = name;
	}
	// For Parcelable 생성자 추가 부분.... 
	BuddyUUIDItem(Parcel src){
		this.msb = src.readLong();
		this.lsb = src.readLong();
		this.name = src.readString();
	}
	
	public static final Parcelable.Creator<BuddyUUIDItem> CREATOR = new Creator<BuddyUUIDItem>() {
		public BuddyUUIDItem createFromParcel(Parcel in){
			return new BuddyUUIDItem(in);
		}
		public BuddyUUIDItem[] newArray(int size){
			return new BuddyUUIDItem[size];
		}
	};
	
	@Override
	public boolean equals(Object o) {
		BuddyUUIDItem item = (BuddyUUIDItem) o;
		
		if(msb == item.msb && lsb == item.lsb){
			return true;
		}
		return false;
	}
	@Override
	public int describeContents() {
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeLong(this.msb);
		dest.writeLong(this.lsb);
		dest.writeString(this.name);
	}
}
